Skip to main content

adacut

A tool to "cut" versions out of an Ada source file.

The "cuts" are defined using lines that start with a --$ comments marker. Those lines are in the form --$ {begin, end, line} {question, answer, cut} [{comment, code}]

Example

The file titi_toto.ads

--$ begin question
-- Titi?
--$ end question
--$ begin answer
-- Toto
--$ end answer

can be turned into two different sources using adacut:

adacut -m question titi_toto.ads > titi.ads

-- Titi?

adacut -m answer titi_toto.ads > toto.ads

-- Toto

The -c <CUT> switch allows to cut the given block.

cuttable.ads

--$ begin cut
    Answer : Integer := 1;
--$ end cut
--$ begin cut
    Answer : Integer := 2;
--$ end cut

adacut -c 1 > cut.ads

    Answer : Integer := 1;

Test Adacut

You need pytest to be installed then simply run $ pytest

If you want to perform more exhaustive testing, you can use tox

$ tox

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

adacut-1.1.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

adacut-1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file adacut-1.1.tar.gz.

File metadata

  • Download URL: adacut-1.1.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for adacut-1.1.tar.gz
Algorithm Hash digest
SHA256 9989b34b37a77760aa7a68490283ba0f66c05ec0e61501f7ccd768c2182edf43
MD5 cb458978437d497edc2058ef6f1d218d
BLAKE2b-256 d84a02be97c4974c82126869dbf16c56ae50211e160cf149bd2fb50da2b5688f

See more details on using hashes here.

File details

Details for the file adacut-1.1-py3-none-any.whl.

File metadata

  • Download URL: adacut-1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for adacut-1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f98e2dddb605358caa8bc95828d8a48d9e8861905b7b2de0e0b4390d71530447
MD5 0c77ea1cffa9552c2338c8cf77a027da
BLAKE2b-256 67d363b39bbcbd895a4b10de756c93d50aef5c46980d27c3e4e7b2429db5e31d

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.1 This release

2 files

1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page