{"id":21506628,"url":"https://github.com/afresh1/ham-convert-frequencylist","last_synced_at":"2025-03-17T14:42:21.761Z","repository":{"id":140298101,"uuid":"367704297","full_name":"afresh1/Ham-Convert-FrequencyList","owner":"afresh1","description":"Perl module to convert between different formats of frequency lists supported by different ham radio software.","archived":false,"fork":false,"pushed_at":"2021-05-23T03:09:18.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"blead","last_synced_at":"2025-01-24T00:27:50.042Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Raku","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/afresh1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2021-05-15T18:31:05.000Z","updated_at":"2021-05-23T03:11:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"45469d6f-678e-4574-89ce-7ccce8028996","html_url":"https://github.com/afresh1/Ham-Convert-FrequencyList","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2FHam-Convert-FrequencyList","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2FHam-Convert-FrequencyList/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2FHam-Convert-FrequencyList/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/afresh1%2FHam-Convert-FrequencyList/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/afresh1","download_url":"https://codeload.github.com/afresh1/Ham-Convert-FrequencyList/tar.gz/refs/heads/blead","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244052547,"owners_count":20390145,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-23T19:43:42.038Z","updated_at":"2025-03-17T14:42:21.756Z","avatar_url":"https://github.com/afresh1.png","language":"Raku","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nHam::Convert::FrequencyList - Convert Frequency List files between formats\n\n# VERSION\n\nversion v0.0.1\n\n# SYNOPSIS\n\n    use Ham::Convert::FrequencyList;\n\n# DESCRIPTION\n\nProvides converters between different formats of frequency lists\ncommonly used to program frequencies into amateur radio equipment.\nDifferent radios use different software to program them,\nsometimes just by preference.\nTrading frequency lists can be difficult due to these incompatibilities\nin the formats and the inability for one piece of software to read\nfiles another.\nThis code aims to make it easier to convert from one format to another to\nease that pain.\n\n# METHODS\n\n## new\n\n    my $converter = Ham::Convert::FrequencyList-\u003enew(\n        ...,\n    );\n\n## read\n\n    my @list = @{ Ham::Convert::FreqencyList-\u003enew-\u003eread($file) };\n\nReads an arrayref of frequencies from a valid argument to\n`Text::CSV/in`.\nThe frequencies returned are a list of hashrefs or undef,\nthe hashrefs are keyed off the [\"internal\\_header\"](#internal_header) name.\n\n## write\n\n    Ham::Convert::FreqencyList-\u003enew-\u003ewrite( $file, \\@list );\n\nWrites an arrayref of frequency definitions to the specified `$file`.\n\n## headers\n\nReturns a list of the header names for the columns in the current format.\n\n# INTERNALS\n\nThese methods are used by subclasses to set up conversions.\n\n## column\\_defs\n\nReturns a list of hashrefs defining the columns expected to be in\nthe file.\n\n    my $defs = [ $converter-\u003ecolumn_defs ];\n\nNow `$defs` could look like:\n\n    [   {   name     =\u003e 'Number',\n            internal =\u003e 'id',\n        },\n        {   name     =\u003e 'Frequency' },\n        {   name     =\u003e 'group',\n            in       =\u003e sub {...},\n            out      =\u003e sub {...},\n        },\n        ...,\n    ];\n\nThe `in` filter is used by [\"read\"](#read) to convert to the internal\nconversion format.\n\n## is\\_empty\\_row\n\n    do_something($row) unless $converter-\u003eis_empty_row($row);\n\nTakes a parsed row hashref  and returns truthy if it is an \"empty\" row.\n\n## read\\_csv\\_params\n\nA hashref of additional parameters to be passed to the [\"csv\" in Text::CSV](https://metacpan.org/pod/Text%3A%3ACSV#csv)\ncall.\n\n## write\\_csv\\_params\n\nThis allows subclasses to adjust the parameters passed to\n[\"new\" in Text::CSV](https://metacpan.org/pod/Text%3A%3ACSV#new) to control the output of the file.\n\nThe default is `eol =\u003e \"\\r\\n\", quote_space =\u003e 0`.\n\n## write\\_headers\n\nThis boolean indicates whether we should write out the header line\nin the CSV file.\n\n## write\\_all\\_columns\n\nThis is a boolean that indicates whether this file type supports\nextra columns or whether they are ignored.\n\nDefaults to the value of [\"write\\_headers\"](#write_headers).\n\n## write\\_empty\\_rows\n\nA boolean value that indicates whether the empty rows should be\nincluded when writing.\n\n## internal\\_header\n\n    my $internal_name = $converter-\u003einternal_header( $external_name );\n\nLooks up the internal header name from the format specific name.\n\nAlso caches the conversion to enable [\"external\\_header\"](#external_header) lookups.\n\nDoes this normally by checking the [\"column\\_defs\"](#column_defs) for a matching `name`\nand returning the `internal` version if it exists.\nOtherwise does some basic conversions to make the headers more\nfriendly to use in perl.\n\nCurrently the conversions are:\n\n- Convert to lowercase.\n- transmit -\u003e tx\n- receive -\u003e rx\n- frequency -\u003e freq\n- Replace non-word characters to underscores.\n\n## external\\_header\n\n    my $external_name = $converter-\u003eexternal_header( $internal_name );\n\nIf the [\"internal\\_name\"](#internal_name) has been calculated,\nlooks up the external name from the cache.\nOtherwise throws an exception.\n\n## filter\\_for\n\n    my $filter = $converter-\u003efilter_for( in =\u003e $internal_header );\n\nReturns a filter, or `undef` if none exists, for the column, looked\nup in [\"column\\_defs\"](#column_defs).\n\n# BUGS AND LIMITATIONS\n\nLikely a lot.\n\n# DEPENDENCIES\n\nPerl 5.16 or higher.\n\n[Text::CSV](https://metacpan.org/pod/Text%3A%3ACSV).\n\n# SEE ALSO\n\n# AUTHOR\n\nAndrew Hewus Fresh \u003candrew@afresh1.com\u003e\n\n# COPYRIGHT AND LICENSE\n\nThis software is Copyright (c) 2021 by Andrew Hewus Fresh \u003candrew@afresh1.com\u003e.\n\nThis is free software, licensed under:\n\n    The MIT (X11) License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafresh1%2Fham-convert-frequencylist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fafresh1%2Fham-convert-frequencylist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fafresh1%2Fham-convert-frequencylist/lists"}