Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions [email protected]_action
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Nemo Action]
Name=AΓ±adir a Steam
Name[en]=Add to Steam
Name[es]=AΓ±adir a Steam
Comment=AΓ±ade juegos que no son de Steam a tu biblioteca de Steam
Comment[en]=Add non-Steam games to your Steam library
Comment[es]=AΓ±ade juegos que no son de Steam a tu biblioteca de Steam
Icon-Name=steam
Exec=<add-to-steam@chmodmasx/add-to-steam.sh %F>
Selection=notnone
Extensions=desktop;exe;sh;py;appimage;
Dependencies=python3;steam;xdg-open;zenity;notify-send;
Active=true
12 changes: 12 additions & 0 deletions add-to-steam@chmodmasx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Add to Steam (Nemo Action)

AΓ±ade juegos que no son de Steam a tu biblioteca de Steam desde el menΓΊ contextual de Nemo (Cinnamon).

- UUID: add-to-steam@chmodmasx
- Autor: chmodmasx
- Soporta: Steam normal y Steam Flatpak

Instala este Action copiando el contenido de la carpeta `files/add-to-steam@chmodmasx/` a `~/.local/share/nemo/actions/` o usando las herramientas de Cinnamon Spices.

Uso:
- Haz clic derecho sobre un `.desktop`, `.AppImage` o script ejecutable y elige "AΓ±adir a Steam".
9 changes: 9 additions & 0 deletions add-to-steam@chmodmasx/[email protected]_action.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Nemo Action]
Active=true
_Name=Add to Steam
_Comment=Add non-Steam games to your Steam library
Icon-Name=steam
Exec=<add-to-steam@chmodmasx/add-to-steam.sh %F>
Selection=notnone
Extensions=desktop;exe;sh;py;appimage;
Dependencies=python3;steam;xdg-open;zenity;notify-send;
115 changes: 115 additions & 0 deletions add-to-steam@chmodmasx/files/add-to-steam@chmodmasx/add-to-steam.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@

#!/bin/bash
set -euo pipefail

add_to_steam() {
local file="$1"
local basename_file
basename_file=$(basename "$file")
local encoded_url
encoded_url="steam://addnonsteamgame/$(python3 -c "import urllib.parse; print(urllib.parse.quote('''$file''', safe=''))")"

touch /tmp/addnonsteamgamefile 2>/dev/null || true

if command -v steam &>/dev/null; then
setsid steam "$encoded_url" >/dev/null 2>&1 || true
elif command -v flatpak &>/dev/null && flatpak info com.valvesoftware.Steam >/dev/null 2>&1; then
setsid flatpak run --branch=stable --arch=x86_64 com.valvesoftware.Steam "$encoded_url" >/dev/null 2>&1 || \
setsid flatpak run com.valvesoftware.Steam "$encoded_url" >/dev/null 2>&1 || true
else
xdg-open "$encoded_url" >/dev/null 2>&1 || true
fi

if command -v notify-send &>/dev/null; then
notify-send -i steam "Add to Steam" "$basename_file ha sido aΓ±adido a Steam." -t 5000
fi
}

show_error() {
local message="$1"
if command -v zenity &>/dev/null; then
zenity --error --title="Error - Add to Steam" --text="$message" --width=400 2>/dev/null
elif command -v notify-send &>/dev/null; then
notify-send -i dialog-error "Error - Add to Steam" "$message" -t 5000 2>/dev/null
fi
echo "ERROR: $message" >&2
}

verify_steam_running() {
if pgrep -x "steam" >/dev/null 2>&1 || \
pgrep -x "steamwebhelper" >/dev/null 2>&1 || \
pgrep -f "com.valvesoftware.Steam" >/dev/null 2>&1 || \
(command -v flatpak >/dev/null 2>&1 && flatpak ps --columns=app | grep -q "com.valvesoftware.Steam") || \
ps ax 2>/dev/null | grep -q 'ubuntu12_32/[s]team'; then
return 0
fi
return 1
}

validate_file() {
local file="$1"
if [[ ! -e "$file" ]]; then
show_error "Archivo no encontrado:\n$file"
return 1
fi
local mime
mime=$(xdg-mime query filetype "$file" 2>/dev/null)
case "$mime" in
"application/x-desktop"|"application/x-ms-dos-executable"|\
"application/vnd.microsoft.portable-executable"|"application/x-msdownload")
return 0
;;
"application/x-executable"|"application/vnd.appimage"|"application/x-shellscript")
if [[ -x "$file" ]]; then
return 0
else
show_error "El archivo no es ejecutable.\nHazlo ejecutable primero: chmod +x \"$(basename \"$file\")\""
return 1
fi
;;
*)
show_error "Tipo de archivo no soportado: $mime"
return 1
;;
esac
}

main() {
if [[ $# -eq 0 ]]; then
show_error "Uso: add-to-steam.sh <archivo1> [archivo2] [...]"
exit 1
fi
if ! verify_steam_running; then
show_error "Steam debe estar en ejecuciΓ³n.\nPor favor, inicia Steam primero."
exit 1
fi
local success_count=0
local fail_count=0
local total=$#
for file in "$@"; do
if validate_file "$file"; then
if add_to_steam "$file"; then
((success_count++))
else
show_error "Error al aΓ±adir $(basename "$file") a Steam."
((fail_count++))
fi
else
((fail_count++))
fi
done
if [[ $total -gt 1 ]]; then
local summary="Procesados: $total\nExitosos: $success_count\nFallidos: $fail_count"
if [[ $fail_count -eq 0 ]]; then
if command -v notify-send &>/dev/null; then
notify-send -i steam "Add to Steam - Resumen" "$summary" -t 7000
fi
else
show_error "$summary"
fi
fi
[[ $fail_count -eq 0 ]] && exit 0 || exit 1
}

main "$@"

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"uuid": "add-to-steam@chmodmasx",
"name": "Add to Steam",
"description": "Add non-Steam games to your Steam library",
"author": "chmodmasx",
"version": "2.0"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR chmodmasx
# This file is distributed under the same license as the add-to-steam@chmodmasx package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: add-to-steam@chmodmasx 2.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-05 00:00+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

#: ../[email protected]_action.in:1
msgid "Add to Steam"
msgstr ""

#: ../[email protected]_action.in:1
msgid "Add non-Steam games to your Steam library"
msgstr ""
26 changes: 26 additions & 0 deletions add-to-steam@chmodmasx/files/add-to-steam@chmodmasx/po/es_ES.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR chmodmasx
# This file is distributed under the same license as the add-to-steam@chmodmasx package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: add-to-steam@chmodmasx 2.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-05 00:00+0000\n"
"PO-Revision-Date: 2025-10-05 21:37-0300\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: es_ES\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.4.2\n"

#: ../[email protected]_action.in:1
msgid "Add to Steam"
msgstr "AΓ±adir a Steam"

#: ../[email protected]_action.in:1
msgid "Add non-Steam games to your Steam library"
msgstr "AΓ±adir un juego que no es de Steam a la librerΓ­a"
3 changes: 3 additions & 0 deletions add-to-steam@chmodmasx/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"author": "chmodmasx"
}
27 changes: 27 additions & 0 deletions extract-audio-from-video@chmodmasx/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Changelog

## [1.1] - 2025-07-04

### Added
- Complete internationalization support with Spanish translations (es.po, es_AR.po)
- All dialog texts and format descriptions are now fully translatable
- Improved user experience with silent exit when canceling format selection

### Fixed
- Clean exit behavior for better user experience

## [1.0] - 2025-07-04

### Added
- Initial release of Extract Audio from Video action
- Support for multiple video formats (MP4, AVI, MKV, MOV, WMV, FLV, WebM, M4V, 3GP, and more)
- Multiple audio output formats (Original, MP3, FLAC, OGG, WAV, AAC, M4A, OPUS)
- FLAC quality selection with compression levels 0-8
- Original format extraction (lossless, no re-encoding)
- Real-time progress tracking with percentage and time estimates
- Bilingual interface (English/Spanish)
- Individual process cancellation support
- Smart file handling with overwrite protection
- Automatic dependency detection with apturl integration
- Error handling and user feedback
- Optimized audio quality settings for each format
76 changes: 76 additions & 0 deletions extract-audio-from-video@chmodmasx/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Extract Audio from Video

A powerful Cinnamon/Nemo Action to extract and convert audio from video files with professional features.

## Key Features

🎡 **Multiple Output Formats**: Original, MP3, FLAC, OGG, WAV, AAC, M4A, OPUS
πŸ“Ή **Universal Video Support**: MP4, AVI, MKV, MOV, WMV, FLV, WebM, and many more
⚑ **Smart Extraction**: Choose original format (no conversion) or convert to any format
πŸ”§ **FLAC Quality Control**: Select compression levels 0-8 for perfect quality/size balance
πŸ“Š **Real-time Progress**: Precise progress tracking with time estimates
🌍 **Bilingual Interface**: Full English and Spanish support
πŸ›‘οΈ **Safe Operations**: Individual process cancellation and overwrite protection
πŸš€ **Easy Installation**: Automatic dependency detection with software center integration

## How It Works

1. **Right-click** any video file in Nemo file manager
2. **Select** "Extract Audio from Video" from context menu
3. **Choose** your preferred audio format
4. **Watch** real-time progress with cancellation option
5. **Get** your audio file in the same directory

## Audio Format Options

### 🎯 **Original Format** (Recommended)
- Extracts audio without re-encoding
- Preserves original quality and codec
- Fastest option - no conversion time
- Perfect for when you want the exact audio track

### πŸ”„ **Conversion Formats**
- **MP3** (192kbps) - Universal compatibility
- **FLAC** - Lossless with quality levels 0-8
- **OGG** (192kbps) - Open source, excellent quality
- **WAV** - Uncompressed, maximum quality
- **AAC** (192kbps) - High efficiency, great quality
- **M4A** (192kbps) - Apple ecosystem compatible
- **OPUS** (128kbps) - Modern codec, best compression

## Installation

### Quick Install via Cinnamon Spices
1. Open **System Settings** β†’ **Extensions** β†’ **Actions**
2. Search for **"Extract Audio from Video"**
3. Click **Install**

### Manual Installation
```bash
# Download and extract to:
~/.local/share/nemo/actions/
# Then restart Nemo
```

### Dependencies
- **ffmpeg** - Handles all audio/video processing
- **zenity** - GUI dialogs (pre-installed on most systems)

*If ffmpeg is missing, the action automatically opens the software center for easy installation.*

## Supported Video Formats
MP4 β€’ AVI β€’ MKV β€’ MOV β€’ WMV β€’ FLV β€’ WebM β€’ M4V β€’ 3GP β€’ MPG β€’ MPEG β€’ TS β€’ VOB β€’ ASF β€’ DivX β€’ F4V β€’ M2V β€’ MTS β€’ OGV β€’ RM β€’ RMVB

## Why Choose This Action?

βœ… **No Command Line Needed** - Everything through simple dialogs
βœ… **Professional Quality** - Uses industry-standard ffmpeg
βœ… **Time Saving** - Batch processing and smart defaults
βœ… **Beginner Friendly** - Clear interface with helpful descriptions
βœ… **Power User Ready** - Advanced options like FLAC quality control
βœ… **Reliable** - Robust error handling and process management

---

**Author:** chmodmasx
**License:** Same as Cinnamon Spices
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[Nemo Action]
_Name=Extract Audio from Video
_Comment=Extract audio track from video files in various formats
Exec=<extract-audio-from-video@chmodmasx/extract-audio.sh %F>
Icon-Name=audio-x-generic
Selection=s
Extensions=mp4;avi;mkv;mov;wmv;flv;webm;m4v;3gp;asf;divx;f4v;m2v;mpg;mpeg;mts;ogv;rm;rmvb;ts;vob;
Loading