Commit Graph

66 Commits

Author SHA1 Message Date
Maas Lalani
cc05efa4b8 fix: indentation problem within code blocks 2022-11-19 10:41:05 -05:00
Mahmoud Fathi
ebc2ab70bf feat: add support for java code execution
As of Java 11 a single file can be launched without explicitly
compiling, packaging and running the file in different steps.
In other words single-file source-code programs can be executed
with "java Program.java", where "Program.java" is the name of
the file to be executed.
2022-09-04 16:25:09 -04:00
Maas Lalani
0572aaac99 fix: ioutil is deprecated 2022-09-01 12:14:50 -04:00
Maas Lalani
e5e3d0f2f7 feat: code comments to hide verbose code. (#174) 2022-07-16 12:35:53 -04:00
Maas Lalani
54b1f0a7b0 doc: add comments to top of public functions and variables 2022-07-04 13:56:33 -04:00
Maas Lalani
33b450d366 Feat: Yank Code Blocks (#173)
Co-authored-by: mellonnen <arvidgotthard98@gmail.com>
2022-07-03 18:14:18 -04:00
Maas Lalani
1e0c30098f feat: ensure that date strings are not interpreted as January 2, 2006 formatted strings 2022-06-27 23:56:34 -04:00
Ivan Tse
93c0f899c4 Add ssh server functionality (#150)
* Add ssh server functionality via `wish` library

This adds a `-server` flag which will spin up an ssh server that
executes the slides bubbletea application upon each ssh session.
2022-04-13 13:07:06 -04:00
Maas Lalani
fb069210e1 fix: GLAMOUR_STYLE not GLAMOUR_THEME 2022-04-04 12:33:35 -04:00
Maas Lalani
ba6d160fa2 feat: slides tutorial 2022-03-24 00:14:38 -04:00
Maas Lalani
8d13e1e3fd feat: respect GLAMOUR_THEME if exists 2022-03-23 23:55:41 -04:00
Maas Lalani
e624c55eb1 fix: do not get stderr when preprocessing slides 2022-03-22 18:39:15 -04:00
Maas Lalani
5b74919376 Search Styles 2021-11-01 14:28:05 -04:00
darmiel
19a4af4a9a test: fixed TestSearch 2021-11-01 14:28:05 -04:00
darmiel
38f6c858ee feat: use bubbles#TextInput 2021-11-01 14:28:05 -04:00
Maas Lalani
8e3bd520fe Clear VirtualText inside SetPage 2021-11-01 11:38:27 -04:00
Maas Lalani
cce6980f62 Use exit code from command if exists 2021-11-01 11:38:27 -04:00
Janszczyrek
6297d57984 Added Page Up and Page Down navigation (#115)
* Added `Page Up` and `Page Down` navigation
2021-10-30 14:03:04 -04:00
Maas Lalani
acc4e08881 Fix: bug where old file name would be reused
There was a bug where the command would reference an old file name which would be deleted which meant that the code block would not execute on future executions and only work the first time.
2021-10-29 16:57:48 -04:00
Daniel
ac106d1060 Vim-like search functionality (#112)
* feat: basic command system

* feat: implemented forward search, backward search and `:<slide>`-command

* fix: golint

* fix: removed `fmt.Sprintf`

* fix: proper args splitting, added `goto` example

* refactor: less verbose output, removed `goto`-example

* fix: ignore empty commands

* refactor: remove `:`-commands, moved `search` to `navigation` package

* feat: implemented different search-types: header-search, full-text search (case sensitive, insensitive and regex)

* feat: go to next occurrence with `ctrl+n`

* fix: regex search

* docs: added search instructions

* refactor: removed search types, style changes

* docs: update README.md

* docs: update README.md

* refactor: `GetSlides()` -> `Pages()`, `Buffer` -> `Query`

* feat: use `tea.KeyRunes` to allow international characters (such as `ä` or `動`)

* test: added test for search

* test: added ignore-case flag test
2021-10-27 12:29:20 -04:00
Maas Lalani
4dd723db31 Remove some language tests to remove build dependencies on NixOS 2021-10-22 21:59:18 -04:00
Maas Lalani
99af53b01f remove redundent ruby tests 2021-10-21 20:41:02 -04:00
darmiel
5f76976a4a fix: remove chmod +x <file> 2021-10-20 20:53:15 -04:00
darmiel
518028e6d3 refactor: only use multi, removed single and base 2021-10-20 20:53:15 -04:00
darmiel
e7fa9dad68 fix: broke ruby, oops! 2021-10-20 20:53:15 -04:00
darmiel
a065914f73 feat: multiple code execute commands; rust code support (#104) 2021-10-20 20:53:15 -04:00
Maas Lalani
99c32cc8fc Clean up navigation 2021-10-10 17:36:33 -04:00
stoovon
d561ab99fc Incorporate code review comments
- Remove redundant comment.
- Streamline "G" case.
- Streamline "ClearVirtualText".
- Include NumSlides within State for improved separation.
2021-10-10 17:16:37 -04:00
stoovon
5adcb09a14 Move tests
This completes the refactoring.
2021-10-10 17:16:37 -04:00
stoovon
2dd286e93f Make Navigate a state function
This simplifies the contract for testing.
It's also more idiomatic functional programming.
Also rule of three (i.e. returning three arguments now, so better to return a type).

Moving tests in next commit. Again, demonstrating no gap in coverage.
2021-10-10 17:16:37 -04:00
stoovon
f31e238378 Refactor to extract navigation package
Introduce a clean separation of concerns between model and navigation.
Note that the tests are not moved in this commit, to prove no break in
functionality. They'll be moved in the next commit.
2021-10-10 17:16:37 -04:00
stoovon
b3dda422d0 Vim-like navigation
Supported sequence examples:

* G = go to last slide
* gg = go to first slide
* 4j = go forward 4 slides
* 13G = go to slide 13

Extracted navigateX methods to increase maintainability of
model.Update() given the additional functionality.

Closes https://github.com/maaslalani/slides/issues/96
2021-10-10 17:16:37 -04:00
Eduardo Cuducos
e4a3413409 Uses custom date format YYYY-MM-DD
Fix #106
2021-10-04 21:26:43 -04:00
Maas Lalani
4d826524e1 WithWordWrap 2021-09-18 21:18:10 -04:00
gsol10
dcf3c49fd6 Word wrap support 2021-09-18 21:18:10 -04:00
Maas Lalani
3bd39616b2 var rename 2021-09-10 16:38:45 -04:00
林玮 (Jade Lin)
644ff86a6b update unittest TestParse 2021-09-10 16:36:46 -04:00
林玮 (Jade Lin)
68adc0a622 be able to run multiple code blocks in a single slide 2021-09-10 16:36:46 -04:00
Maas Lalani
bf5f13f3b3 s/numbering/paging/g 2021-08-06 16:45:12 -04:00
Eduardo Cuducos
74d6d19a30 Adds customization to the bottom metadata
Fix #87
2021-08-06 16:45:12 -04:00
Eduardo Cuducos
45ea575822 Fixes metadata fallback strategy 2021-08-05 17:42:37 -04:00
Paul
caa98c45fd ignore shebang 2021-08-02 18:53:08 -04:00
Maas Lalani
03ed79bf57 fix: bug with preceeding --- and YAML comments as headers in markdown 2021-07-11 16:51:02 -04:00
Maas Lalani
095ea050e7 feat: Add lua language support for code blocks execution 2021-07-07 16:27:48 -04:00
Maas Lalani
a86cf85712 Ensure slides has at least some content to prevent crashing 2021-07-01 20:42:44 -04:00
Kjell Kvinge
7ac31fc040 add perl code execution 2021-06-30 17:29:42 -04:00
Mark Stenglein
de9baaf976 EXECUTE: TEST: Use more common sed instead of sd
This patch updates the `sd Find Replace` test case to make use of `sed`
instead of `sd`. This should help tests pass on a wider range of
systems without introducing a testing dependency.
2021-06-27 22:15:39 -04:00
Maas Lalani
742251d742 Ensure file is executable for preprocessing to work 2021-06-27 21:02:01 -04:00
Maas Lalani
e7274f993e Pre-process any commands 2021-06-27 21:02:01 -04:00
Maas Lalani
6d4f555579 Add node/js code execution 2021-06-27 10:20:45 -04:00