pnedev / comparePlus

Compare plugin for Notepad++
GNU General Public License v3.0
1.01k stars 139 forks source link

Compare only the 1st part of a line #385

Closed moltra closed 7 months ago

moltra commented 8 months ago

I am trying to write a Docker compose file comparing an existing one that works on my system and the recommendations for the new Docker that I am trying to add. I would like to be able to see the different elements and what is different behind them.

i.e. name: Container Image:

Here is the example of the docker compose section that is working. ''' glances: <<: *common-keys-apps # See EXTENSION FIELDS at the top image: nicolargo/glances:latest-full container_name: glances profiles: ["db_setup","frontend"]

privileged: true # Only for VM

# network_mode: host
networks:
  - socket_proxy
ports:
  - "61208:61208"
pid: host
volumes:
  - $DOCKERDIR/appdata/glances/glances.conf:/glances/conf/glances.conf # Use this if you want to add a glances.conf file
  - $USERDIR:/data/home:ro
  - /media/data:/data/data:ro
  # - /var/run/docker.sock:/var/run/docker.sock:ro # Use Docker Socket Proxy instead for improved security
environment:
  # GLANCES_OPT: "-C /glances/conf/glances.conf --export influxdb2 -q"
  # GLANCES_OPT: "--export influxdb"
  GLANCES_OPT: "-w"
  DOCKER_HOST: tcp://socket-proxy:2375
  TZ: $TZ
labels:
  - "traefik.enable=true"
  ## HTTP Routers
  - "traefik.http.routers.glances-rtr.entrypoints=https"
  - "traefik.http.routers.glances-rtr.rule=Host(`glances.$DOMAINNAME_CLOUD_SERVER`)"
  ## Middlewares
  - "traefik.http.routers.glances-rtr.middlewares=chain-oauth@file"
  ## HTTP Services
  - "traefik.http.routers.glances-rtr.service=glances-svc"
  - "traefik.http.services.glances-svc.loadbalancer.server.port=61208"
  - '''

If you think this should be a seperate plugin, please let me know and I will see if I can make it or find one that I can tweak to get what I want.

pnedev commented 8 months ago

Honestly, I don't quite understand the question. ComparePlus plugin is generic compare tool meaning that it can compare any two files and it will display them side by side showing in color the differences. Could you explain again in steps what you expect from it to do and the result?

moltra commented 8 months ago

I am trying to compare 2 docker compose files side by side. the Sections are the same in both files. The information could be different. Here is an image about what I am talking about. The green highlighted sections must be filled out with the new information.

image

I might be looking at the wrong plugin to do these changes. It might be easier to write a docker compose plugin that allows me to compare files, but also allows me to check for common errors.

i,e. the same IP address or port used multiple times, since you could have a large number of sections in the docker compose file for a lot of separate docker configurations.

pnedev commented 8 months ago

OK, so far so good. What actually happens when you compare the two docker files, what is not looking as expected?

pnedev commented 7 months ago

Closing this issue now as irrelevant.

@moltra , You can write again here if you have more specific questions/proposals.