ac000 / itsa Goto Github PK
View Code? Open in Web Editor NEWCommand line client to the UK's HMRC Make Tax Digital for Income Tax Self-Assessment API
License: GNU General Public License v2.0
Command line client to the UK's HMRC Make Tax Digital for Income Tax Self-Assessment API
License: GNU General Public License v2.0
When exiting from a MTD error, use mtd_err2str()
This end point takes an optional query string in the form ?from=YYYY-MM-DD&to=YYYY-MM-DD with each of from & to being optional.
Currently get-end-of-period-statement-obligations will just show all the periods, at some point, being able to restrict what is shown may be handy.
$ ./itsa list-calculations
[INFO] ***
[INFO] *** Using TEST API
[INFO] ***
[OK] Got list of calculations
idx calculation_id timestamp type
-----------------------------------------------------------------------------
1 ca100312-ddd5-52ee-9852-1a946b5c76a2 2018-07-13 12:13 inYear
[CONFIRMATION] Select a calculation to view (n) or quit (Q)>
Probably want to allow more space for the index and fix the position of the type entries.
$ ./itsa create-period
[INFO] ***
[INFO] *** Using TEST API
[INFO] ***
AddressSanitizer:DEADLYSIGNAL
=================================================================
==42598==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7f1995eb9715 bp 0x7ffd27b8dd90 sp 0x7ffd27b8d528 T0)
==42598==The signal is caused by a READ memory access.
==42598==Hint: address points to the zero page.
#0 0x7f1995eb9715 in __strlen_avx2 (/lib64/libc.so.6+0x160715)
#1 0x7f19960ea8a1 in strdup (/lib64/libasan.so.6+0x598a1)
#2 0x557d224244ef in get_period /home/andrew/programming/itsa/src/itsa.c:1656
#3 0x557d224244ef in create_period /home/andrew/programming/itsa/src/itsa.c:1674
#4 0x557d224244ef in dispatcher /home/andrew/programming/itsa/src/itsa.c:2277
#5 0x557d224244ef in main /home/andrew/programming/itsa/src/itsa.c:2346
#6 0x7f1995d80b74 in __libc_start_main (/lib64/libc.so.6+0x27b74)
#7 0x557d22425a7d in _start (/home/andrew/programming/itsa/src/itsa+0x5a7d)
AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV (/lib64/libc.so.6+0x160715) in __strlen_avx2
==42598==ABORTING
gdb backtrace
(gdb) bt full
#0 __strlen_avx2 () at ../sysdeps/x86_64/multiarch/strlen-avx2.S:65
No locals.
#1 0x00007f953bfb8183 in __GI___strdup (s=0x0) at strdup.c:41
len = <optimized out>
new = <optimized out>
#2 0x0000560a7b6f54f0 in get_period (end=<synthetic pointer>,
start=<synthetic pointer>) at itsa.c:1656
met = <optimized out>
start_obj = 0x0
end_obj = 0x0
err = <optimized out>
result = 0x560a7c755140
obs = <optimized out>
period = <optimized out>
index = <optimized out>
jbuf = 0x560a7c7744a0 "[\n {\n \"status_code\": 200,\n \"status_str\": \"OK\",\n \"url\": \"https://test-api.service.hmrc.gov.uk/obligations/details/MZ200944B/income-and-expenditure\",\n \"method\": \"GET\",\n "...
result = <optimized out>
obs = <optimized out>
period = <optimized out>
index = <optimized out>
jbuf = <optimized out>
err = <optimized out>
out_free = <optimized out>
met = <optimized out>
start_obj = <optimized out>
end_obj = <optimized out>
#3 create_period () at itsa.c:1674
start = 0x0
end = 0x0
ret = 0
err = <optimized out>
start = <optimized out>
end = <optimized out>
ret = <optimized out>
err = <optimized out>
#4 dispatcher (cfg=0x7fff4c65f840, argv=<optimized out>, argc=2)
at itsa.c:2277
No locals.
#5 main (argc=2, argv=<optimized out>) at itsa.c:2346
err = <optimized out>
ret = 0
flags = <optimized out>
config_dir = "/home/andrew/.config/itsa", '\000' <repeats 2799 times>...
log_level = 0x0
fph_ops = {
fph_device_id = 0x0,
fph_user = 0x0,
fph_tz = 0x0,
fph_ipaddrs = 0x0,
fph_ipaddrs_ts = 0x0,
fph_macaddrs = 0x0,
fph_srcip = 0x0,
fph_srcip_ts = 0x0,
fph_srcport = 0x0,
fph_screens = 0x0,
fph_window_sz = 0x0,
fph_browser_plugins = 0x0,
fph_browser_js_ua = 0x0,
fph_browser_dnt = 0x0,
fph_vendor_ip = 0x0,
fph_vendor_fwd = 0x0,
fph_ua = 0x0,
fph_multi_factor = 0x0,
fph_license_id = 0x0,
fph_version = 0x0,
fph_version_cli = 0x560a7b6f7150 <set_ver_cli>,
fph_prod_name = 0x560a7b6f7140 <set_prod_name>,
user_data = 0x0
}
cfg = {
fph_ops = 0x7fff4c65f910,
extra_hdrs = 0x560a7b6ff0a0 <extra_hdrs>,
config_dir = 0x7fff4c65fad0 "/home/andrew/.config/itsa"
}
(gdb)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.