Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add --json-file/-j option to read from file w/ json contents #311

Closed
wants to merge 44 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0fbb22d
wip: simple json handling - needs big clean up
jacobmealey Apr 26, 2024
9e2f4a4
clean up source code
jacobmealey May 7, 2024
0bd91b6
added more tests, need to add special handling for queries
jacobmealey May 7, 2024
0e22840
finalized testing and found a bug where querys all stack together
jacobmealey May 10, 2024
e01fd50
query strings generating. need to fix for iteration
jacobmealey May 11, 2024
3d55d30
cleaning up for pr
jacobmealey May 14, 2024
dcea792
test w/ actions
jacobmealey May 14, 2024
41bb29e
Added sudo back
jacobmealey May 14, 2024
18ecad7
put json objects
jacobmealey May 15, 2024
29de2be
remove putting whole object?
jacobmealey May 15, 2024
a1d0ed8
removed whole line
jacobmealey May 15, 2024
ba76262
fixed memory issues
jacobmealey May 15, 2024
5618105
remove sanitizer
jacobmealey May 15, 2024
1d9d70d
spelling
jacobmealey May 15, 2024
1685194
attempting to make everything play nice
jacobmealey May 15, 2024
0785c94
fixed typo
jacobmealey May 15, 2024
5264619
different packages and paths
jacobmealey May 15, 2024
20c3b8c
cleaned up tests
jacobmealey May 15, 2024
73b272a
removed mac os specifics from makefile, clean style
jacobmealey May 15, 2024
95fa596
remove params putting
jacobmealey May 15, 2024
26e4859
not leaking
jacobmealey May 15, 2024
bb1a0e3
free this_query
jacobmealey May 15, 2024
373bec0
clean up for pr
jacobmealey May 16, 2024
1851fee
cleanup file handling
jacobmealey May 16, 2024
cc74cdf
get other actions working -- need to get curl for win working
jacobmealey May 16, 2024
b44e296
undo file cleanup... doesn't work on windows
jacobmealey May 16, 2024
542fe6a
put json in behind a flag
jacobmealey May 17, 2024
6ceea4a
fix whitespace in tests.json
jacobmealey May 17, 2024
12e6725
white space Update .github/workflows/makefile.yml
jacobmealey May 17, 2024
6eb908e
Update homebrew includes .github/workflows/makefile.yml
jacobmealey May 17, 2024
292fd77
Update .github/workflows/makefile.yml
jacobmealey May 17, 2024
a8dad0a
make --json-file act like other optional builds
jacobmealey May 17, 2024
ad93491
Merge branch 'trurl-json-in' of github.com:jacobmealey/urler into tru…
jacobmealey May 17, 2024
aa39f61
Make it act as a filter
jacobmealey May 24, 2024
e5e2429
added error check for parts key
jacobmealey May 24, 2024
ede3153
style
jacobmealey May 24, 2024
aa7d58b
update oom messaging
jacobmealey May 24, 2024
d2b3fca
cleanup makefile
jacobmealey May 24, 2024
2f81538
Update Makefile
jacobmealey May 24, 2024
3975591
flip around the lines
jacobmealey May 24, 2024
1c22c47
makefile JSON_C_PREFIX, update readme
jacobmealey Jun 11, 2024
e6f135e
cleanup readme
jacobmealey Jun 11, 2024
a947832
trying setting json_c_path in GITHUB_ENV
jacobmealey Jun 11, 2024
7502449
prefix not path
jacobmealey Jun 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/makefile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
run: brew install json-c

- name: make
run: make CFLAGS="-I$(brew --prefix)/include" LDFLAGS="-L$(brew --prefix)/lib"
run: make

- name: sanity test
run: ./trurl -v
Expand Down
9 changes: 7 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,13 @@ ifndef NDEBUG
CFLAGS += -g
endif
ifdef TRURL_JSON_IN
CFLAGS += -DTRURL_JSON_IN -Wno-gnu -I /opt/homebrew/include
LDLIBS += -ljson-c -L /opt/homebrew/lib
prefix := $(shell brew --prefix)
jacobmealey marked this conversation as resolved.
Show resolved Hide resolved
ifneq ($(strip $(prefix)),)
CFLAGS += -I$(prefix)/include
LDLIBS += -L$(prefix)/lib
jacobmealey marked this conversation as resolved.
Show resolved Hide resolved
endif
CFLAGS += -DTRURL_JSON_IN -Wno-gnu
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I couldn't find any info on -Wno-gnu is it necessary? because it breaks the build on older GCCs.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hm thats not good. It was required by json-c , I think some of there macros are what required this. I'm wondering if we should jump out of json-c, and use one that is purely c89 (and small enough we can just include the source in the repo or something like @vszakats has been saying)

I think a lot of the scaffolding can stay in place for parsing single objects / streaming stuff. it would really just be the guts of from_json() that would need to be swapped out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What OS / compiler have you been using?

LDLIBS += -ljson-c
endif
MANUAL = trurl.1

Expand Down