readme, pack-script

This commit is contained in:
krustur 2018-11-27 00:05:19 +01:00
parent 775f4a740a
commit 9e011101c2
4 changed files with 149 additions and 10 deletions

79
IconSnap.readme Normal file
View File

@ -0,0 +1,79 @@
Short: Snap Workbench icons to a virtual grid
Uploader: krustur@google.com (Krister Jansson)
Author: Krister Jansson
Type: util/cli
Version: 0.2
Architecture: m68k-amigaos >= 2.0.4
Distribution: Aminet
About IconSnap:
IconSnap is a command line utility that snaps Workbench icons to a virtual
grid.
Have you ever felt limited by Workbench's ability to layout the icons? This
util aids you in your struggles by allowing you to roughly position your
icons in Workbench any way you want, and then run this util to snap your
Icons to a given grid.
Features:
- Snap Workbench icons to grid (x and y individually customizable)
- Add Padding to left and top (individually customizable)
- Snap single icon
- Snap all icons in entire folder or current directory
- Experimental feature: Snap vertically to bottom
- Experimental feature: Snap horizontally to center
Installation:
Copy IconSnap to C:
Usage:
Order your Icons in Workbench roughly the way you want them positioned, and
then snapshot their position. After that run this tool and point it to the
folder containg the Icons to be Snapshot.
Command line usage:
IconSnap FILE/K,DIR/K,PADLEFT/N,PADTOP/N,ALIGNX/N,ALIGNY/N,
CENTERX/S,BOTTOMY/S,VERBOSE/S
FILE/K: Single File or Folder to Snap. Can point to either the
actual file/folder or it's associated .info file.
DIR/K: Folder containing Files and Folders to Snap. If you
want to snap the actual folder, use the FILE parameter
instead.
PADLEFT/N: Use this option to create some Padding to the left of
the Snapped Icons.
PADTOP/N: Use this option to create some Padding above the Snapped
Icons.
ALIGNX/N: Number of pixels in the virual grid on the X axis.
ALIGNY/N: Number of pixels in the virual grid on the Y axis.
CENTERX/S: Snap horizontally to center of the Icon.
NOTE: A bug in the code, that reads the Icon width and
heigth incorrectly, results in this feature not behaving
as expected!
BOTTOMY/S: Snap vertically to the bottom of the Icon.
NOTE: A bug in the code, that reads the Icon width and
heigth incorrectly, results in this feature not behaving
as expected!
VERBOSE/S: Active verbose logging. Used for debugging purposes.
Examples:
IconSnap FILE Sys:Disk.info
IconSnap DIR Sys:Utilities/
IconSnap DIR Sys:Tools PADLEFT 15 PADTOP 15 ALIGNX 5 ALIGNY 5 CENTERX BOTTOMY
Bug reports and Feature requests:
Post your Bug reports and Feature requests on github:
https://github.com/krustur/IconSnap/issues

View File

@ -1,8 +1,20 @@
# IconSnap
## About
IconSnap is a command line utility that snaps Workbench icons to a grid.
IconSnap is a command line utility that snaps Workbench icons to a virtual
grid.
Have you ever felt limited by Workbench's ability to layout the icons? This util aids you in your struggles by allowing you to roughly position your icons in Workbench any way you want, and then run this util to snap your Icons to a given grid.
Have you ever felt limited by Workbench's ability to layout the icons? This
util aids you in your struggles by allowing you to roughly position your
icons in Workbench any way you want, and then run this util to snap your
Icons to a given grid.
#### Features
- Snap Workbench icons to grid (x and y individually customizable)
- Add Padding to left and top (individually customizable)
- Snap single icon
- Snap all icons in entire folder or current directory
- Experimental feature: Snap vertically to bottom
- Experimental feature: Snap horizontally to center
## Version
```VER: IconSnap 0.2 (26.11.2018)```
@ -14,13 +26,51 @@ AmigaOS 2.04
Copy IconSnap to C:
## Usage
Order your Icons in Workbench roughly the way you want them positioned, and
then snapshot their position. After that run this tool and point it to the
folder containg the Icons to be Snapshot.
### Command line usage
```
IconSnap FILE/K,DIR/K,PADLEFT/N,PADTOP/N,ALIGNX/N,ALIGNY/N,
CENTERX/S,BOTTOMY/S,VERBOSE/S
FILE/K: Single File or Folder to Snap. Can point to either the
actual file/folder or it's associated .info file.
DIR/K: Folder containing Files and Folders to Snap. If you
want to snap the actual folder, use the FILE parameter
instead.
PADLEFT/N: Use this option to create some Padding to the left of
the Snapped Icons.
PADTOP/N: Use this option to create some Padding above the Snapped
Icons.
ALIGNX/N: Number of pixels in the virual grid on the X axis.
ALIGNY/N: Number of pixels in the virual grid on the Y axis.
CENTERX/S: Snap horizontally to center of the Icon.
NOTE: A bug in the code, that reads the Icon width and
heigth incorrectly, results in this feature not behaving
as expected!
BOTTOMY/S: Snap vertically to the bottom of the Icon.
NOTE: A bug in the code, that reads the Icon width and
heigth incorrectly, results in this feature not behaving
as expected!
VERBOSE/S: Active verbose logging. Used for debugging purposes.
```
### Examples
```
IconSnap FILE Sys:Disk.info
IconSnap DIR Sys:Utilities/
IconSnap DIR Sys:Tools PADLEFT 15 PADTOP 15 ALIGNX 5 ALIGNY 5 CENTERX BOTTOMY
```
## Bug reports and Feature requests
Post your Bug reports and Feature requests [on github](https://github.com/krustur/IconSnap/issues)
## Contact
Contact me on twitter https://twitter.com/krustur
Post your Bug reports and Feature requests [on github](https://github.com/krustur/IconSnap/issues)

12
pack Normal file
View File

@ -0,0 +1,12 @@
.key version/a
IF EXISTS bin_<version>
delete bin_<version> all quiet force
ENDIF
makedir bin_<version>
lha -a a bin_<version>/IconSnap.lha IconSnap.readme IconSnap
;delete bin/IconSnap.lha
;vc -v src/main.c -stack-check -lamiga -lposix -IDev:vbcc_posix/targets/m68k-amigaos/include -LDev:vbcc_posix/targets/m68k-amigaos/lib -DBUILD_PLATFORM_AMIGA -c99 -o IconSnap
;copy IconSnap r

View File

@ -19,9 +19,7 @@
// TODO: Readme for Amiga
// TODO: Pack
// TODO: Upload to Aminet
// TODO: Align via .backdrop-file
// TODO: Scripted tests!
// BUG: Problems reading some icons width/heigth information
// C helpers
#define MAX(x, y) (((x) > (y)) ? (x) : (y))