Skip to content

Commit

Permalink
Standalone version
Browse files Browse the repository at this point in the history
  • Loading branch information
jperon committed Jan 7, 2025
1 parent 891e980 commit 40b58b6
Show file tree
Hide file tree
Showing 10 changed files with 1,211 additions and 787 deletions.
1 change: 1 addition & 0 deletions .args
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/zip/gabctk.py
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Main

on:
push:
tags:
- "v*"

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create zip
run: make release
- name: Release
uses: softprops/action-gh-release@v2
with:
files: '*.zip'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
gabctk.com

*.py[cod]
*~

Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
com:
cp python.com gabctk.com
zip -r gabctk.com .args ./*.py midiutil/*.py abc2xml/*.py

release: com
zip gabctk.zip gabctk.com

run:
python gabctk
python gabctk.py
12 changes: 10 additions & 2 deletions README-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,19 @@ this parameter.

If alerts are defined, gabctk will return a message each time it detects the
it detects the string in the song text.
For example, `gabctk -i \<File.gabc\> -a j -a eumdem` will return a message
For example, `gabctk.py -i \<File.gabc\> -a j -a eumdem` will return a message
if the text contains *j* or the word *eumdem*.

It is also possible to convert several files at the same time. In this case,
parameter to `-o`, `-l`, `-c`, `-x` or `-b` is a folder and not an individual file. For example, to convert to midi all
gabc files in the current directory:

gabctk -i *.gabc -o .
gabctk.py -i *.gabc -o .

Standalone executable
---------------------

Thanks to [cosmopolitan](https://github.com/jart/cosmopolitan/), a standalone
`gabctk.com` executable can be found in [Releases](https://github.com/jperon/gabctk/releases),
or generated from sources with `make com` command (providden `zip` command is available to shell).
Its use is identical to what’s described above, replacing `gabctk.py` by `gabctk.com`.
16 changes: 13 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ Le *gabc* est le langage utilisé par le logiciel
[Gregorio](https://gregorio-project.github.io/).
Vous en trouverez la description [ici](https://gregorio-project.github.io/gabc/).


Gabctk
------

Expand Down Expand Up @@ -62,12 +61,23 @@ ce paramètre.

Si des alertes sont définies, gabctk renverra un message chaque fois
qu'il détecte la chaîne de caractères dans le texte du chant.
Par exemple, `gabctk -i \<Fichier.gabc\> -a j -a eumdem` renverra un message
Par exemple, `gabctk.py -i \<Fichier.gabc\> -a j -a eumdem` renverra un message
si le texte contient des *j* ou le mot *eumdem*.

Il est encore possible de convertir plusieurs fichiers à la fois. En ce cas,
il faut donner en paramètre à `-o`, `-l`, `-c`, `-x` ou `-b` un dossier
et non un fichier individuel. Par exemple, pour convertir en midi tous
les gabc du répertoire courant :

gabctk -i *.gabc -o .
gabctk.py -i *.gabc -o .

Exécutable autonome
-------------------

Il est possible de récupérer dans [Releases](https://github.com/jperon/gabctk/releases)
ou de créer soi-même un exécutable contenant tout ce qui est nécessaire pour utiliser
gabctk, aussi bien sous Linux que sous MacOS ou encore Windows (grâce à
[cosmopolitan](https://github.com/jart/cosmopolitan/)). Étant admis que le programme
`zip` est accessible à l’interpréteur de commandes, `make com` devrait générer
`gabctk.com`, utilisable comme décrit ci-dessus (en remplaçant `gabctk.py`
par `gabctk.com`).
26 changes: 26 additions & 0 deletions midiutil/License.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
--------------------------------------------------------------------------
MIDUTIL, Copyright (c) 2009-2016, Mark Conway Wirt
<emergentmusics) at (gmail . com>

This software is distributed under an Open Source license, the
details of which follow.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
--------------------------------------------------------------------------

Loading

0 comments on commit 40b58b6

Please sign in to comment.