Script to analyze text streams to split and count by week number
45 USDI have lots of files which have the date YYYY-MM-DD in the first field.
I want to be able to easily split, count, or label the lines.
Any content after the first tab is considered one block. Content after the first tab could contain any text, utf8, including tabs.
----
Example input:
2016-11-04a
2016-11-04b
2016-11-07c
2016-11-08d
----
Example output with "-w" for "week number":
45 2016-11-04a
45 2016-11-04b
46 2016-11-07c
46 2016-11-08d
Inserted field 1 is the week number 1..52, restarts at zero each year. This inserts week numbers in new field 1.
Variant -w0 is the same, but count first week from 0 instead of 1,
----
Example output with "-b" for "line Break":
2016-11-04a
2016-11-04b
2016-11-07c
2016-11-08d
Note the extra line break between weeks. Just one line break between weeks.
----
Example output with "-w" for "week start day and count".
# WEEK of 2016-10-30: 2
2016-11-04a
2016-11-04b
# WEEK of 2016-11-06: 2
2016-11-07c
2016-11-08d
The week start date is inserted once at the start of any week, after the colon is the count.
----
Option -z to output each week (between first and last), even if count = 0.
The purpose is if there's sparse data, eg many empty weeks.
----
Option to set the week start. Default week start = Sunday. -s = sunday, -m = monday
----
Option -y to invert the date to DD-MM-YYYY instead of YYYY-MM-DD.
----
Options can be combined. -help, -h = list of options.
No options = -w -b -s
----
I will invoke your script with piped input on the command line. Ubuntu or MacOSX. (Use normal ruby, perl, etc.) Script should be self-contained. I will provide test files.
-
260 Expirienced perl developer, ready to take it.
-
5 days45 USD
28 1 0 5 days45 USDI can do this in Ruby
Current freelance projects in the category Web Programming
Need to extract POST / GET / PUT requests from the TikTok mobile application urgently.In essence. It is necessary to extract POST / GET / PUT requests from the TikTok mobile application. Even by essence, it is not necessary to fully reverse anything since signatures are available on the internet, etc. But it would also be great. All authorization (Sending… Web Programming, Desktop Apps ∙ 4 hours 15 minutes back ∙ 6 proposals |
Product search function by imageIt is necessary to develop and integrate a product search function by image on the website.What needs to be implementedA "Search by Photo" button on the website.Image upload by the user: JPG.Search for visually similar products in the catalog.Display results in the form of… PHP, Web Programming ∙ 4 hours 52 minutes back ∙ 24 proposals |
Full-stack development — Amazon PPC Dashboard (Stage 1)Need a full-stack developer with experience working with Amazon API to implement Stage 1 of the internal PPC dashboard. The project is real, the data is live, everything is ready to start. Frontend prototype (5 pages, React + TypeScript): WHAT IS ALREADY READY — Frontend… Javascript and Typescript, Web Programming ∙ 12 hours 35 minutes back ∙ 17 proposals |
Development of a website on WordPress for an IT company
226 USD
We are looking for a WordPress developer to create a small company website that will provide IT services. The project does not require designing from scratch — the main materials are already prepared. We already have: the website structure and page map; ready texts for the… Web Programming ∙ 20 hours 11 minutes back ∙ 79 proposals |
OpenCart — rental catalog of special equipment
135 USD
OpenCart — Equipment Rental Catalog Need to launch an equipment rental catalog on OpenCart. Theme: excavators cherry pickers forklifts generators cranes scaffolding other construction equipment. It is preferable that you already have a ready-made template or developments… Web Programming, Data Parsing ∙ 20 hours 44 minutes back ∙ 46 proposals |