{"id":20272170,"url":"https://github.com/mpatacchiola/gnu-hammer","last_synced_at":"2026-07-02T10:32:41.529Z","repository":{"id":98284368,"uuid":"101574013","full_name":"mpatacchiola/gnu-hammer","owner":"mpatacchiola","description":"Set of simple tools for Unix systems. It includes date-generator, filesystem monitoring.","archived":false,"fork":false,"pushed_at":"2017-09-03T17:38:45.000Z","size":23,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-01T10:39:27.668Z","etag":null,"topics":["date-generator","date-time","filesystem","filesystem-events","system-monitoring","unix-systems","wordlist","wordlist-generator"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mpatacchiola.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-08-27T19:05:29.000Z","updated_at":"2025-01-02T17:48:10.000Z","dependencies_parsed_at":null,"dependency_job_id":"987a2d4c-1d47-4596-81f2-d260cd76b547","html_url":"https://github.com/mpatacchiola/gnu-hammer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mpatacchiola/gnu-hammer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpatacchiola%2Fgnu-hammer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpatacchiola%2Fgnu-hammer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpatacchiola%2Fgnu-hammer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpatacchiola%2Fgnu-hammer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mpatacchiola","download_url":"https://codeload.github.com/mpatacchiola/gnu-hammer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mpatacchiola%2Fgnu-hammer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35043933,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-02T02:00:06.368Z","response_time":173,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["date-generator","date-time","filesystem","filesystem-events","system-monitoring","unix-systems","wordlist","wordlist-generator"],"created_at":"2024-11-14T12:42:11.014Z","updated_at":"2026-07-02T10:32:41.510Z","avatar_url":"https://github.com/mpatacchiola.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nCollection of simple tools for Unix systems which I realised for solving basic tasks.\n\nmidwife\n--------\n\nMidwife allows tracking all the new files and folders generated in a specific root directory (including all the sub-folders). It is useful to implement rudimentary sandboxes. To compile the programme it is necessary to have a recent version of g++ which implements the [filesystem library](http://en.cppreference.com/w/cpp/experimental/fs). Using g++ 7.0 it is possible to compile as follows:\n\n```\ng++-7 -std=c++1z -O3 midwife.cpp -lstdc++fs -o ./midwife\n```\n\nThe executable takes the following parameters as input:\n\n1. -d, --destination: the absolute path of the folder to track (default ./)\n2. -s, sleep: define the time (in milliseconds) between calls (default 1000)\n\nThe output produced by midwife is a string which identifies the absolute path of a new file/folder which has been generated.\nThe output can be easily redirected in a log file:\n\n```\nmidwife --destination /home/user/program --sleep 1000 \u003e\u003e log.txt\n```\n\ngregory\n--------\n\nGregory is a python script based on the `datetime` module which can generate a list of dates taken from the standard [Gregorian calendar](https://en.wikipedia.org/wiki/Gregorian_calendar) based on user-defined criteria. The output can be redirected in a text file.\nTo **install** the module follow this procedure:\n\n```\nsudo cp gregory.py /usr/local/bin/gregory\nsudo chmod +x /usr/local/bin/gregory\n```\n\nThe **optional parameters** for gregory are summarised here:\n\n```\n-o PATH_OUTPUT, --output PATH_OUTPUT\n                        path to an output file\n-s START_DATE, --start START_DATE\n                        start-date in format: DD/MM/YYYY\n-e END_DATE, --end END_DATE\n                        end-date in format: DD/MM/YYYY\n-d DIVIDER_CHAR, --divide DIVIDER_CHAR\n                        divide the date members using this character (default:\n                        none)\n-t, --twin            if given allows the presence of duplicated dates in\n                        case of single and double-format\n-q, --quiet           if given does not print any info on terminal. Useful\n                        for pipelines.\n-c, --capital         if given sets the first letter of days (A) and months\n                        (B) as capital\n-C, --CAPITAL         if given sets all the letters of days (A) and months\n                        (B) as capital\n-l LOCALE, --locale LOCALE\n                        set the locale language, it is used to generate months\n                        and days names\n-f [FORMAT_LIST [FORMAT_LIST ...]], --format [FORMAT_LIST [FORMAT_LIST ...]]\n                        list of formats to produce (default: all-formats). It\n                        can be any combination of year-mont-day. Capital\n                        letters identify the zero-padded spelling for days (D)\n                        and months (M), and the four-letters notation for\n                        years (Y). Lower-case letters identify non-zero-padded\n                        notation for days (d) and months (m), and the two-\n                        letters notation for years (y). Month can be\n                        represented as full locale name (B) or abbreviated\n                        name (b). The date 01/02/2003 can be represented as\n                        follows: dmy=1203, DMY=01022003, dMY=1022003,\n                        Ymd=200321, YMD=20030201, DBY=01February2003,\n                        DbY=01Feb2003\n```\n\nNow some **examples** of usage. To print on terminal all the dates between a starting point (-s) 01/01/2001 and an ending point (-e) 05/01/2001 in format day/month:\n\n```\ngregory -q -s 01/01/2001 -e 05/01/2001 -f DM\n```\n\n```\n0101\n0201\n0301\n0401\n```\n\nTo print on terminal all the dates between a starting point (-s) 01/01/2001 and yesterday in format day/month/year:\n\n```\ngregory -q -s 01/01/2001 -f DMY\n```\n\n```\n01012001\n02012001\n03012001\n...\n02092017\n```\n\n\n\nTo print the same range showing full-name for days and months:\n\n```\ngregory -q -s 01/01/2001 -f ABY\n```\n\n```\nmondayjanuary2001\ntuesdayjanuary2001\nwednesdayjanuary2001\nthursdayjanuary2001\n...\nsaturdayseptember2017\n```\n\nPrinting the same range with a separator (-d) and starting capital letter (-c) for days and months:\n\n```\ngregory -q -s 01/01/2001 -f ABY -d '/' -c\n```\n\n```\nMonday/January/2001\nTuesday/January/2001\nWednesday/January/2001\n...\nSaturday/September/2017\n```\n\nTo save the streaming on a file called `date.txt` and show statistics:\n\n```\ngregory -s 01/01/2001 -f ABY -o 'date.txt' \n```\n\n```\nStart date .................. 01/01/2001\nEnd date .................... 03/09/2017\nTotal days .................. 6089\nTotal lines worst case ...... 6089\nSize worst case (bytes) ..... ~108993\nSize worst case (MB)    ..... ~0.11\nYou have 5 seconds to abort...\nStarted!\nDone!\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpatacchiola%2Fgnu-hammer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmpatacchiola%2Fgnu-hammer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmpatacchiola%2Fgnu-hammer/lists"}